@defNCBar<@GetPos @GetArms /mtrx AngleA matrix rotate def x1a y1a mtrx itransform pop x2a y2a mtrx itransform pop sub dup 0 mtrx transform 3 -1 roll 0 gt /y2a exch y2a add def /x2a exch x2a add def /y1a exch neg y1a add def /x1a exch neg x1a add def ifelse mark x2 y2 x2a y2a x1a y1a x1 y1 tx@Dict begin false @Line end /LPutVar [ x2 y2 x2 y2 x2a y2a x1a y1a x1 y1 ] cvx def /LPutPos LPutVar @AnglesMP def>

@defGrid<newpath /a 4 string def /b ED /c ED /n ED cvi dup 1 lt pop 1 if /s ED s div dup 0 eq pop 1 if /dy ED s div dup 0 eq pop 1 if /dx ED dy div round dy mul /y0 ED dx div round dx mul /x0 ED dy div round cvi /y2 ED dx div round cvi /x2 ED dy div round cvi /y1 ED dx div round cvi /x1 ED /h y2 y1 sub 0 gt 1 -1 ifelse def /w x2 x1 sub 0 gt 1 -1 ifelse def b 0 gt /z1 b 4 div CLW 2 div add def /Helvetica findfont b scalefont setfont /b b .95 mul CLW 2 div add def if systemdict /setstrokeadjust known true setstrokeadjust /t def /t transform 0.25 sub round 0.25 add exch 0.25 sub round 0.25 add exch itransform bind def ifelse gsave n 0 gt 1 setlinecap [ 0 dy n div ] dy n div 2 div setdash 2 setlinecap ifelse /i x1 def /f y1 dy mul n 0 gt dy n div 2 div h mul sub if def /g y2 dy mul n 0 gt dy n div 2 div h mul add if def x2 x1 sub w mul 1 add dup 1000 gt pop 1000 if i dx mul dup y0 moveto b 0 gt gsave c i a cvs dup stringwidth pop /z2 ED w 0 gt z1 z1 z2 add neg ifelse h 0 gt b neg z1 ifelse rmoveto show grestore if dup t f moveto g t L stroke /i i w add def repeat grestore gsave n 0 gt 1 setlinecap [ 0 dx n div ] dy n div 2 div setdash 2 setlinecap ifelse /i y1 def /f x1 dx mul n 0 gt dx n div 2 div w mul sub if def /g x2 dx mul n 0 gt dx n div 2 div w mul add if def y2 y1 sub h mul 1 add dup 1000 gt pop 1000 if newpath i dy mul dup x0 exch moveto b 0 gt gsave c i a cvs dup stringwidth pop /z2 ED w 0 gt z1 z2 add neg z1 ifelse h 0 gt z1 b neg ifelse rmoveto show grestore if dup f exch t moveto g exch t L stroke /i i h add def repeat grestore>

@defBeginOL<dup (all) eq exch TheOL eq or IfVisible not Visible /IfVisible true def if IfVisible Invisible /IfVisible false def if ifelse> @defInitOL</OLUnit [ 3000 3000 matrix defaultmatrix dtransform ] cvx def /Visible CP OLUnit idtransform T moveto def /Invisible CP OLUnit neg exch neg exch idtransform T moveto def /BOL @BeginOL def /IfVisible true def>

@defDashLine<dup 0 gt /a .5 def @PathLength exch div pop /a 1 def @PathLength ifelse /b ED /x ED /y ED /z y x add def b a .5 sub 2 mul y mul sub z @Div round z mul a .5 sub 2 mul y mul add b exch @Div dup y mul /y ED x mul /x ED x 0 gt y 0 gt and [ y x ] 1 a sub y mul [ 1 0 ] 0 ifelse setdash stroke>

`=`